package lzzy.net.chaper04_jpa;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public interface CommentRepository extends JpaRepository<Comment, Integer> {
    public List<Comment> findAllByAuthor(String author);

    public List<Comment> findAllByAuthorAndArticleId(String author, Integer aId);

    public List<Comment> findByAuthorContains(String author);

    public List<Comment> findAllByOrderByArticleId();
}
